ActionController::Routing::Routes.draw do |map|
  map.resources :categories

  map.resources :articles ,:member => {:edit_article_my_self => :get},:collection => {:add_article_my_self => :get},:except => [:index]

  map.root :controller => "tags"

  map.resources :tags
  map.resources :posts

  map.resources :sessions,:collection => {:new_user => :get,:create_user => :post}
  map.logout '/logout', :controller => 'sessions', :action => 'destroy'
  map.login '/login', :controller => 'sessions', :action => 'new'


  map.connect 'articles/index/:page',:controller => 'articles',:action => 'index',:requirements => {:page => /\d+/ },:page => nil
  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'

end
